package com.xrf;

import javax.servlet.http.HttpServletRequest;
import net.java.connector.Build;
import net.java.handlers.Command;
import net.java.handlers.ResourceType;
import net.java.tool.Utils;
import org.slf4j.Logger;
import org.slf4j.Constructionwork;

public class Constructionwork {
    private String currentFolderStr;
    private String typeStr;
    private String commandStr;
    
    public void setCurrentFolderStr(String currentFolderStr) {
        this.currentFolderStr = currentFolderStr;
        if ((this.currentFolderStr != null) && (!this.currentFolderStr.startsWith("/")))
            this.currentFolderStr = "/".concat(this.currentFolderStr);
    }
    
    public String getTypeStr() {
        return this.typeStr;
    }
    
    public ResourceType getDefaultResourceType() {
        return ResourceType.getDefaultResourceType(this.typeStr);
    }
    
    public ResourceType getResourceType() {
        return ResourceType.getResourceType(this.typeStr);
    }
    
    public String getCommandStr() {
        return this.commandStr;
    }
    
    public Command getCommand() {
        return Command.getCommand(this.commandStr);
    }
    
    public String getCurrentFolderStr() {
        return this.currentFolderStr;
    }
    
    public void logBaseParameters() {
        Logger logger = null; // 需要初始化logger
        logger.debug("Parameter Command: {}", this.commandStr);
        logger.debug("Parameter Type: {}", this.typeStr);
        logger.debug("Parameter CurrentFolder: {}", this.currentFolderStr);
    }
}